<!DOCTYPE html>
<html   xmlns="http://www.w3c.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.org/ui"
        xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head/>
    <h:body>
        <h:form>
            <h:panelGrid>
                <h:outputText value="Does not work properly..."/>
                <h:panelGrid columns="2">
                    <p:imageCropper value="#{imageCropperBean.croppedImage}" image="/IMG/photo1.jpg" initialCoords="225,75,300,125"/>
                    <p:graphicImage id="cropped" name="crop/#{imageCropperBean.newImageName}.jpg" />
                </h:panelGrid>
                
                <h:outputLink id="path" value="crop/#{imageCropperBean.newImageName}.jpg">
                    <h:outputText value="crop/#{imageCropperBean.newImageName}.jpg"/>
                </h:outputLink>
                
                <p:commandButton value="Crop" action="#{imageCropperBean.crop}" update="cropped path" icon="ui-icon-scissors"/>
            </h:panelGrid>
        </h:form>
    </h:body>
</html>
